package com.androidbook.droid1;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

public class DroidActivity extends Activity {

	protected static final String TAG = "Droid1";

	/** Called when the activity is first created. */

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		Log.i(TAG, this.getClass().getName() + " onCreate");
		// TextView txt = (TextView) findViewById(R.id.textView1);
	}

	@Override
	protected void onStart() {
		super.onStart();
		if (this.getClass().getName()
				.equals("com.androidbook.droid1.DroidActivity")) {
			// Intent intent = new Intent(getApplicationContext(),
			// DroidActivityTemp.class);
			// startActivityForResult(intent, 42);
		}
		// Cursor people = getContentResolver().query(
		// ContactsContract.Contacts.CONTENT_URI, null, null, null,
		// null);
		// while (people.moveToNext()) {
		// String ccc = people.getString(people
		// .getColumnIndex(PhoneLookup.DISPLAY_NAME));
		// Log.i(TAG, ccc);
		// }

		Log.i(TAG, this.getClass().getName() + " onStart");

	}

	@Override
	protected void onRestart() {
		super.onRestart();
		Log.i(TAG, this.getClass().getName() + " onRestart");
	}

	@Override
	protected void onStop() {
		super.onStop();
		Log.i(TAG, this.getClass().getName() + " onStop");
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		Log.i(TAG, this.getClass().getName() + " onDestroy");
	}

	@Override
	protected void onActivityResult(int requestCode, int resultCode,
			Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		Log.i(TAG, "DroidActivity onActivityResult, request: "
				+ requestCode + " result:" + resultCode);
	}

	@Override
	protected void onResume() {
		super.onResume();
		Log.i(TAG, this.getClass().getName() + " onResume");
	}

	@Override
	protected void onPause() {
		super.onPause();
		Log.i(TAG, this.getClass().getName() + " onPause");
	}
}